<?php

namespace Addons\Weather;

use Common\Controller\Addon;

class WeatherAddon extends Addon
{

    public $info = array(
        'name' => 'Weather',
        'title' => '紫叶随风悬浮天气插件',
        'description' => '方便快捷即装即用',
        'status' => 1,
        'author' => '紫叶随风',
        'version' => '2.1.1'
    );

    public function install()
    {
        return true;
    }

    public function uninstall()
    {
        return true;
    }

    public function pageFooter()
    {
        $config = M('addons')->where(array('name' => 'Weather'))->find();
        $config = json_decode($config['config'], true);
        
        $this->assign('keys', $config['keys']);
        $this->display('View/Weather');
    
    }
 
}